<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head> 
       <title>Facelet Title</title>
    </h:head>
    <h:body>
        <p>
        CIC Report
        <h:column>
                <h:form enctype="multipart/form-data">
                    <h:inputFile value="#{courseofferingBean.CICReport}" />
                    <h:commandButton value="Upload" />
                </h:form>
        </h:column>
        </p>
            <p>
        Course Coordinator Report
        <h:column>
                <h:form enctype="multipart/form-data">
                    <h:inputFile value="#{courseofferingBean.courseCoordinatorReport}" />
                    <h:commandButton value="Upload" />
                </h:form>
        </h:column>
            </p>
            <p>
        End Of Semester Report
        <h:column>
                <h:form enctype="multipart/form-data">
                    <h:inputFile value="#{courseofferingBean.endOfSemesterReport}" />
                    <h:commandButton value="Upload" />
                </h:form>
            </h:column>
            </p>
            <p>
        Lecture Notes
        <h:column>
                <h:form enctype="multipart/form-data">
                    <h:inputFile value="#{courseofferingBean.lectureNotes}" />
                    <h:commandButton value="Upload" />
                </h:form>
        </h:column>
            </p>
            <p>
        Schedule 
        <h:column>
                <h:form enctype="multipart/form-data">
                    <h:inputFile value="#{courseofferingBean.schedule}" />
                    <h:commandButton value="Upload" />
                </h:form>
        </h:column>
        Syllabus <h:column>
                <h:form enctype="multipart/form-data">
                    <h:inputFile value="#{courseofferingBean.syllabus}" />
                    <h:commandButton value="Upload" />
                </h:form>
        </h:column>
            </p>
        
        <h:message style="color: red" for="form"></h:message>
        <h:form id="form">
            <p>
        Course: 
        <h:inputText  required="true" value="#{courseofferingBean.course}" >
        </h:inputText>
            </p>
            <p>
        Section: 
        <h:inputText  required="true" value="#{courseofferingBean.section}" >
            <f:convertNumber integerOnly="true"></f:convertNumber>
        </h:inputText>
            </p>
            <p>
        Semester: 
        <h:inputText  required="true" value="#{courseofferingBean.semester}" >
        </h:inputText>
            </p>
            <p>
        Instructor: 
        <h:inputText  required="true" value="#{courseofferingBean.instructor}" >
        </h:inputText>
            </p>
            <p>
        Course Outcome Attainment
        <h:inputText  required="true" value="#{courseofferingBean.courseOutcomeAttinmentTarget}" >
        </h:inputText>
            </p>
          
        
        <p>
            Assignment
            <h:selectManyCheckbox value="#{courseofferingBean.assignments}">
                <f:selectItems value="#{courseofferingBean.allAssignments}" var="assign"
                               itemLabel="#{assign.name}" itemValue="#{assign.name}" />
            </h:selectManyCheckbox>
        </p>
        <p>
            Course outcome direct assessment
            <h:selectManyCheckbox value="#{courseofferingBean.courseOutcomeDirectAssessments}">
                <f:selectItems value="#{courseofferingBean.allCourseOutcomeDirectAssessments}" var="coda"
                               itemLabel="#{coda.courseOutcome}" itemValue="#{coda.courseOutcome}" />
            </h:selectManyCheckbox>
        </p>
        <p>
           Course outcome survey result 
           <h:selectManyCheckbox value="#{courseofferingBean.courseOutcomeSurveyResults}">
                <f:selectItems value="#{courseofferingBean.allCourseOutcomeSurveyResults}" var="cosa"
                               itemLabel="#{cosa.uid}" itemValue="#{cosa.uid}" />
            </h:selectManyCheckbox>
        </p>
            <h:commandButton id='submit' value="Submit" action="#{courseofferingBean.createCourseOffering()}" />
        </h:form>
    </h:body>
</html>

